/*
	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


dojo._xdResourceLoaded(function(dojo, dijit, dojox){
return {depends: [["provide", "icubox.Clock"],
["require", "dijit._Widget"],
["require", "dijit._Templated"],
["require", "dojo.date.locale"]],
defineResource: function(dojo, dijit, dojox){if(!dojo._hasResource["icubox.Clock"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["icubox.Clock"] = true;
dojo.provide("icubox.Clock");

//Require some common widget resources
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dojo.date.locale");

dojo.declare("icubox.Clock",
    [dijit._Widget, dijit._Templated], {     
        templateString: "<div  ><span dojoAttachPoint=\"clock\" ></span></div>",
       postCreate : function() {
         this._update();
       },      
       _update : function(){
          var timeVal=dojo.date.locale.format(new Date(), {selector:'time', timePattern: 'HH:mm:ss'});
          this.clock.innerHTML = timeVal
          setTimeout(dojo.hitch(this, "_update"),1000)
       }
       
   } // end icubox.Clock
);

}

}};});
